﻿@*
    For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
    ViewData["Title"] = "测试";
}
<style>
.test p{
    color:red;
    margin:10px;
}
</style>
<div class="test">
    <h3>我的第一个视图!</h3>
    <p>欢迎 @ViewData["Name"]</p>
    <p>日期：@DateTime.Now.ToString()</p>
</div>

@section scripts{
<script>
let p = document.querySelector(".test p");
p.addEventListener("click", () => {
    alert("欢迎！");
});
</script>
}

